"""
# -*- coding: utf-8 -*-
# @Time    : 2023/5/31 16:50
# @Author  : 王摇摆
# @FileName: Cost.py
# @Software: PyCharm
# @Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
"""
import numpy as np


def calcCost(X, y, W):
    return np.sum(np.square(X.dot(W) - y))
